#!/usr/local/bin/python

def f(n):
    return 3*n - 6

def g(n):
    return 5*n + 2

def h(n):
    return -2*n + 17

def doto(value, func):
    return func(value)

print doto(7, f)
print doto(7, g)
print doto(7, h)

def is_divisible_by_2_or_5(n):
    """
        >>> is_divisible_by_2_or_5(8)
        True
        >>> is_divisible_by_2_or_5(7)
        False
        >>> is_divisible_by_2_or_5(5)
        True
        >>> is_divisible_by_2_or_5(9)
        False
    """
    return n % 2 == 0 or n % 5 == 0 

def compare(a, b):
    """
        >>> compare(5, 4)
        1
        >>> compare(7, 7)
        0
        >>> compare(2, 3)
        -1
        >>> compare(42, 1)
        1
    """

    if a > b:
        return 1
    elif a == b:
        return 0
    elif a < b:
        return -1


if __name__ == '__main__':
    import doctest
    doctest.testmod()  
